package com.aspose.cells;

import java.util.HashMap;

class zcbu {
   private zbqg a;
   private zbxz b;
   private zcda c;
   private int d;
   private int e;
   private byte[] f;
   private HashMap g;

   zcbu(zcda var1, zbqg var2) {
      this.c = var1;
      this.a = var2;
   }

   void a(zbxz var1, HashMap var2) throws Exception {
      this.b = var1;
      this.g = var2;

      while(true) {
         this.d = this.b.a();
         switch(this.d) {
         case 359:
            this.c();
            break;
         case 360:
            this.d();
            break;
         case 363:
            this.b();
            break;
         case 577:
            this.a();
            break;
         case 588:
            return;
         default:
            this.e = this.b.b();
            this.b.a((long)this.e);
         }
      }
   }

   private void a() throws Exception {
      this.f = this.c.a(this.b);
      zuk var1 = new zuk(this.a);
      var1.a(zcch.d(this.f, 0));
      com.aspose.cells.b.a.a.ze.a(this.a.b(), (Object)var1);

      while(true) {
         this.d = this.b.a();
         switch(this.d) {
         case 585:
            this.f = this.c.a(this.b);
            if (this.f.length > 4) {
               int var2 = this.f.length;
               var1.b(new byte[var2]);
               byte var3 = 0;
               System.arraycopy(this.f, var3, var1.h(), 0, var2);
            }
            break;
         case 586:
            this.f = this.c.a(this.b);
            var1.d(com.aspose.cells.b.a.zc.e(this.f, 0));
            var1.a(com.aspose.cells.b.a.zc.a(this.f, 2));
            break;
         case 587:
            this.b.a(1L);
            return;
         default:
            this.e = this.b.b();
            this.b.a((long)this.e);
         }
      }
   }

   private void b() throws Exception {
      this.f = this.c.a(this.b);
      int var1 = com.aspose.cells.b.a.zc.a(this.f, 0);
      boolean var2 = (this.f[4] & 255 & 1) != 0;
      zut var3 = this.a.b(var1);
      if (var2) {
         var3.a().a(3, "true");
      }

      zuq var4 = null;

      while(true) {
         this.d = this.b.a();
         switch(this.d) {
         case 364:
            this.b.a(1L);
            return;
         case 365:
         default:
            this.e = this.b.b();
            this.b.a((long)this.e);
            break;
         case 366:
            this.f = this.c.a(this.b);
            int var5 = com.aspose.cells.b.a.zc.a(this.f, 0);
            var4 = var3.e(var5);
            break;
         case 367:
            this.a(var4);
            break;
         case 368:
            this.b(var4);
            break;
         case 369:
            this.c(var4);
            break;
         case 370:
            this.d(var4);
            break;
         case 371:
            this.e(var4);
         }
      }
   }

   private void a(zuq var1) {
      this.f = this.c.a(this.b);
      int var2 = com.aspose.cells.b.a.zc.a(this.f, 0);
      var1.a(var2, (Object)null);
   }

   private void b(zuq var1) {
      this.f = this.c.a(this.b);
      int var2 = com.aspose.cells.b.a.zc.a(this.f, 0);
      double var3 = com.aspose.cells.b.a.zc.f(this.f, 4);
      var1.a(var2, (Object)var3);
   }

   private void c(zuq var1) {
      this.f = this.c.a(this.b);
      int var2 = com.aspose.cells.b.a.zc.a(this.f, 0);
      boolean var3 = this.f[4] == 1;
      var1.a(var2, (Object)var3);
   }

   private void d(zuq var1) {
      this.f = this.c.a(this.b);
      int var2 = com.aspose.cells.b.a.zc.a(this.f, 0);
      byte var3 = this.f[4];
      zst var4 = a(var3);
      var1.a(var2, (Object)var4);
   }

   static zst a(byte var0) {
      switch(var0) {
      case 0:
         return zst.e;
      case 7:
         return zst.a;
      case 15:
         return zst.i;
      case 23:
         return zst.g;
      case 29:
         return zst.d;
      case 36:
         return zst.f;
      case 42:
         return zst.c;
      default:
         return zst.c;
      }
   }

   private void e(zuq var1) throws Exception {
      this.f = this.c.a(this.b);
      int var2 = com.aspose.cells.b.a.zc.a(this.f, 0);
      String var3 = zcch.d(this.f, 4);
      var1.a(var2, (Object)var3);
   }

   private void c() throws Exception {
      this.f = this.c.a(this.b);
      int var1 = com.aspose.cells.b.a.zc.a(this.f, 0);
      int var2 = 4;
      String[] var3 = new String[var1];

      for(int var4 = 0; var4 < var1; ++var4) {
         int[] var5 = new int[]{var2};
         var3[var4] = zcch.a(this.f, var5);
         var2 = var5[0];
      }

      this.a.a(var3);
   }

   private void d() throws Exception {
      this.f = this.c.a(this.b);
      byte var1 = 2;
      int[] var2 = new int[]{var1};
      String var3 = zcch.a(this.f, var2);
      int var5 = var2[0];
      var2[0] = var5;
      String var4 = zcch.a(this.f, var2);
      var5 = var2[0];
      switch(this.f[0]) {
      case 0:
         this.a.a(0);
         var3 = ((zqe)this.g.get(var3)).e;
         var3 = zbue.b(var3);
         this.a.e(zbqg.a(var3, 0));
         break;
      case 1:
         this.a.a(3);
         this.a.b(var4, var3);
         break;
      case 2:
         this.a.a(4);
         var3 = ((zqe)this.g.get(var3)).e;
         this.a.b(var4, var3);
      }

   }
}
